package it.wzm.memento.log;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */





import java.io.*;

/**
 *
 * @author leonardo
 */
public class Test implements Runnable{
    
    Log l = Log.getLog(Log.Severity.INFO);
    
    public void run() {
        
        try {
            int z=0;
            writer:
            for (int i=0;i<20;i++) {
                
                
                
                System.out.println("Loop...");
                
                l.info("Test:" + z++);
                
                
                Thread.sleep(500);
                /*
                if (new BufferedReader(new InputStreamReader(System.in)).readLine().equals("x"))               
                    break writer;
                 * */                    
            }
            
            l.close();
            
            
        } catch(Exception e) {
            System.out.println("Errore test..." + e.getMessage());
        }
        
    }
    

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        
        //l.setSeverity(Severity.INFO);
        
        
        Test t = new Test();
        new Thread(t).start();
        //System.out.println(l.getStatus());
        //l.setSeverity(LogConstants.Severity.INFO);


        
        
        
    }

}
